home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / internet / uucode / frmucode.frm (.txt) next >
Encoding:
Visual Basic Form  |  1996-02-28  |  4.9 KB  |  165 lines

  1. VERSION 4.00
  2. Begin VB.Form frmUUCode 
  3.    Caption         =   "UU Code"
  4.    ClientHeight    =   2490
  5.    ClientLeft      =   2625
  6.    ClientTop       =   1560
  7.    ClientWidth     =   4635
  8.    Height          =   2895
  9.    Icon            =   "frmUCode.frx":0000
  10.    Left            =   2565
  11.    LinkTopic       =   "Form1"
  12.    LockControls    =   -1  'True
  13.    ScaleHeight     =   2490
  14.    ScaleWidth      =   4635
  15.    Top             =   1215
  16.    Width           =   4755
  17.    Begin VB.TextBox txtEncodedFile 
  18.       Height          =   285
  19.       Left            =   1620
  20.       TabIndex        =   9
  21.       Top             =   1860
  22.       Width           =   2985
  23.    End
  24.    Begin VB.TextBox txtMaxFileSize 
  25.       Alignment       =   1  'Right Justify
  26.       Height          =   285
  27.       Left            =   1620
  28.       TabIndex        =   6
  29.       Text            =   "0"
  30.       Top             =   1080
  31.       Width           =   825
  32.    End
  33.    Begin VB.TextBox txtEncodePath 
  34.       Height          =   285
  35.       Left            =   1620
  36.       TabIndex        =   4
  37.       Top             =   780
  38.       Width           =   2985
  39.    End
  40.    Begin VB.TextBox txtDecodePath 
  41.       Height          =   285
  42.       Left            =   1620
  43.       TabIndex        =   11
  44.       Top             =   2160
  45.       Width           =   2985
  46.    End
  47.    Begin VB.CommandButton cmdDecode 
  48.       Caption         =   "UU&Decode"
  49.       Height          =   345
  50.       Left            =   480
  51.       TabIndex        =   7
  52.       Top             =   1440
  53.       Width           =   1035
  54.    End
  55.    Begin VB.TextBox txtInputFile 
  56.       Height          =   285
  57.       Left            =   1620
  58.       TabIndex        =   2
  59.       Top             =   480
  60.       Width           =   2985
  61.    End
  62.    Begin VB.CommandButton cmdEncode 
  63.       Caption         =   "UU&Encode"
  64.       Height          =   345
  65.       Left            =   480
  66.       TabIndex        =   0
  67.       Top             =   60
  68.       Width           =   1035
  69.    End
  70.    Begin VB.Label Label1 
  71.       AutoSize        =   -1  'True
  72.       Caption         =   "Encoded &File:"
  73.       Height          =   195
  74.       Index           =   4
  75.       Left            =   600
  76.       TabIndex        =   8
  77.       Top             =   1890
  78.       Width           =   975
  79.    End
  80.    Begin VB.Label Label1 
  81.       AutoSize        =   -1  'True
  82.       Caption         =   "Max Encode File&Size:"
  83.       Height          =   195
  84.       Index           =   2
  85.       Left            =   30
  86.       TabIndex        =   5
  87.       Top             =   1110
  88.       Width           =   1530
  89.    End
  90.    Begin VB.Label Label1 
  91.       AutoSize        =   -1  'True
  92.       Caption         =   "De&code To Path:"
  93.       Height          =   195
  94.       Index           =   3
  95.       Left            =   330
  96.       TabIndex        =   10
  97.       Top             =   2190
  98.       Width           =   1230
  99.    End
  100.    Begin VB.Label Label1 
  101.       AutoSize        =   -1  'True
  102.       Caption         =   "E&ncode To Path:"
  103.       Height          =   195
  104.       Index           =   1
  105.       Left            =   360
  106.       TabIndex        =   3
  107.       Top             =   810
  108.       Width           =   1215
  109.    End
  110.    Begin VB.Label Label1 
  111.       AutoSize        =   -1  'True
  112.       Caption         =   "&Input File:"
  113.       Height          =   195
  114.       Index           =   0
  115.       Left            =   870
  116.       TabIndex        =   1
  117.       Top             =   510
  118.       Width           =   690
  119.    End
  120. Attribute VB_Name = "frmUUCode"
  121. Attribute VB_Creatable = False
  122. Attribute VB_Exposed = False
  123. Option Explicit
  124. Private Sub cmdEncode_Click()
  125.     Dim UU As UUCode
  126.     Dim InFile As String
  127.     Dim OutPath As String, OutFile As String
  128.     Dim MaxFileSize As Long
  129.     Dim t As Single
  130.     t = Timer
  131.     Screen.MousePointer = vbHourglass
  132.     Set UU = New UUCode
  133.     InFile = txtInputFile.Text
  134.     OutPath = txtEncodePath.Text
  135.     MaxFileSize = Val(txtMaxFileSize.Text)
  136.     If UU.UUEncodeFiles(InFile, OutPath, MaxFileSize) Then
  137.     End If
  138.     Set UU = Nothing
  139.     Screen.MousePointer = vbDefault
  140.     Debug.Print "Runtime", (Timer - t)
  141. End Sub
  142. Private Sub cmdDecode_Click()
  143.     Dim UU As UUCode
  144.     Dim InFile As String, OutFile As String, OutPath As String
  145.     Dim t As Single
  146.     t = Timer
  147.     Screen.MousePointer = vbHourglass
  148.     Set UU = New UUCode
  149.     InFile = txtEncodedFile.Text
  150.     OutFile = ""
  151.     OutPath = txtDecodePath.Text
  152.     If UU.UUDecodeFiles(InFile, OutFile, OutPath) Then
  153.     End If
  154.     Set UU = Nothing
  155.     Screen.MousePointer = vbDefault
  156.     Debug.Print "Runtime", (Timer - t)
  157. End Sub
  158. Private Sub Form_Load()
  159.     txtInputFile.Text = App.Path & "\"
  160.     txtEncodePath.Text = App.Path & "\"
  161.     txtMaxFileSize.Text = 0
  162.     txtEncodedFile.Text = App.Path & "\"
  163.     txtDecodePath.Text = App.Path & "\"
  164. End Sub
  165.